﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SeaButtleMasterPage.Master" Inherits="System.Web.Mvc.ViewPage<SeaBattle.UI.Web.Models.GameBoardSetupModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	BoardSetup
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <table id="board-setup-panel">
    <tr>
    <td id="board-setup-left-panel">
    <div id="picture-ship-panel"></div>
    <br />
    <p><%: Html.ActionLink("Reset your field", "ResetField", "Game", new { })%></p>
    <p><%: Model.StatusSetuping %></p>
    <p><%: Model.Count %> ship</p>    
    <% if (Model.IsSetuped){%>
        <input type="button" id="CheckStart" value="Check to Start"
            onclick="self.location.href='<%:Url.Action("CheckStart","Game") %>';" />
    <%} %>
    </td>
    <td = id="board-setup-right-panel">
    <br />
    <br />
        <table id="table-setup">
        <% for (int i = 0; i < 10; i++){ %>    
        <tr>
        <% for(int j =0;j<10;j++) { %>       
        <% var Index = i * 10 + j; %>
        <td class="<%: Model.CellClass(i,j) %>" id="setup-cell-<%:Index %>" style="cursor: hand">
        <% if ( Model.CellClass(i,j) == "acsess" ) {%>            
            <%: Html.ActionLink("*", "BoardSetting", "Game", new { index = Index }, new { })%>
            <%} %> 
        </td>
        <%} %>
        </tr>
        <%} %>
        </table>

    </td>
    </tr>
    </table>
    <script type="text/javascript">
        var myAjaxObject;
    </script>

</asp:Content>
